﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="PlugNT.Cms.Web.Admin.Pre_Comment.Admin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>评论列表</title>
<link href="../css/control.css" rel="stylesheet" type="text/css" media="all" />
</head>
<script language = "JavaScript">
function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
  {
    var e = form.elements[i];
    if(e.type=="checkbox")
    {
      if (e.name != "chkAll" &&　e.name != "isexact" && e.name != "isorder" && e.name != "islocked" && e.name != "showsql" && e.name != "ispublish" && e.disabled==false)
        e.checked = form.chkAll.checked;
    }
  }
}
function SubmitUrl()
{
    var obj=document.getElementById("ddlTables");
    var currpostfix=obj.options[obj.selectedIndex].value; 
    var keyword=document.getElementById("keyword").value;
    var isexact=document.getElementById("isexact").checked?"1":"0";
    var islocked=document.getElementById("islocked").checked?"1":"0";    
    var showsql="0";
    
    document.location.href="Admin.aspx?currpostfix="+currpostfix+"&keyword="+keyword+"&isexact="+isexact+"&islocked="+islocked+"&showsql="+showsql;
}
function ShowTip(idstr,flag)
{
    var dtip=document.getElementById("dtip"+idstr);
    var itip=document.getElementById("itip"+idstr);
    if(flag)
    {
        itip.style.display="";
        dtip.style.display="none";
    }
    else
    {
        itip.style.display="none";
        dtip.style.display="";
    }    
}
function IsNumber(str){
    if (/^\d+$/.test(str)){return true;}else{return false;}
}
function UpdateTip(idstr)
{
    var tip=document.getElementById("tip"+idstr);
    if(IsNumber(tip.value))
    {
        ShowTip(idstr,false);
        document.location.href="Admin.aspx?t=updatetip&id="+idstr+"&value="+tip.value;
    }
    else
    {
        alert("请输入数字！");
    }
}
</script>
<body>
<div class="frmstatic" style="display:block">
    <span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
    <div class="controls">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td align"left">
                <table>
                    <tr>
                        <td><img src="../images/maintenance_32x32.gif" width="16" height="16" /></td>
                        <td><label>设置 > 评论列表</label></td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <span>操作 > </span>
                <a href='javascript:window.history.back();'>返回</a> 
            </td>
          </tr>
        </table>
    </div>
    <span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</div>
    
    
<div class="frmstatic" style="display:block">
 <table width="100%" border="0" cellpadding="10" cellspacing="0">
   <tr valign="top">
    <td valign="top">
    
    <form id="Form1" runat="server">
    <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#DDE9FF">
     <tr>
        <td bgcolor="#ecf5ff">
            <table  width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                  <td align="left" style="width:20px;">
                    <img src="../images/cms-ico2.gif" width="16" height="16" align="absmiddle">
                  </td>
                  <td align="left"  style="width:auto; display:<%=(!PlugNT.Custom.WebConfig.IsAccess)?"block":"none" %>;">
                    分表：
                    <asp:DropDownList ID="ddlTables" runat="server"></asp:DropDownList>
                  </td>
                  <td align="left">
                    标题或编号(文章)：
                    <input id="keyword" type="text" class="input" style="width:110px;" keyword="输入新闻标题关键词进行搜索！" value="<% =keyword %>">
                  </td>
                  <td align="right">
                    <table border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="50px" align="right" keyword="精确查询性能会更好速度会更快">
                          <label for="isexact" style="cursor:hand;"><input type="checkbox" id="isexact" name="isexact" <% =isexact=="1"?"checked=checked":"" %>  />精确</label>
                        </td>
                        <td width="80px" align="center">
                          <label for="islocked" style="cursor:hand;"><input type="checkbox" id="islocked" name="islocked" <% =islocked=="1"?"checked=checked":"" %> />未审核</label>
                        </td>

                        <td align="right" valign="middle" width="50"> 
                          <input id="iptsearch" type="button" value=" 搜索 " class="bt" onclick="SubmitUrl();" />
                          <!-- 高级↓ //-->
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
            </table>
        </td>
     </tr>
    </table>
    
    <br />
    
    <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#d2e6fa">
      <tr valign="top">
       <td valign="top">
          
       <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ecf5ff">
        <tr>
          <td width="23" height="25" nowrap bgcolor="#DDE9FF"></td>
          <td width="28" nowrap bgcolor="#DDE9FF"><span class="line">编号</span></td>
          <td align="center" bgcolor="#DDE9FF"><span class="line">留言名</span></td>
          <td align="center" bgcolor="#DDE9FF"><span class="line">IP</span></td>
          <td align="center" nowrap bgcolor="#DDE9FF"><span class="line">审核</span></td>
          <td align="center" nowrap bgcolor="#DDE9FF"><span class="line">标题</span></td>
          <td align="center" nowrap bgcolor="#DDE9FF"><span class="line">时间</span></td>
          <td align="center" nowrap bgcolor="#DDE9FF"><span class="line">顶帖数</span></td>          
          <td align="center" nowrap bgcolor="#DDE9FF"><span class="line">操作</span></td>
        </tr>
        
        <asp:Repeater ID="Repeater_admin" runat="server">
          <ItemTemplate>
            <tr align="center">
              <td height="25" nowrap bgcolor="#F4FBFF"><asp:CheckBox ID="ID_list" runat="server" /></td>
              <td nowrap  bgcolor="#F4FBFF"><asp:Label ID="Label_id" runat="server" Text='<%#Eval("id") %>'></asp:Label>
              </td>
              <td  bgcolor="#F4FBFF" keyword='<%#Eval("username") %>'> <%#Eval("username")%> </td>
              <td nowrap  bgcolor="#F4FBFF" keyword='<%#Eval("ip") %>'><%#Eval("ip")%></td>
              <td nowrap  bgcolor="#F4FBFF" keyword='<%#((bool)Eval("locked")) ? "未审核" : "已审核"%>'><%#((bool)Eval("locked")) ? "X" : "√"%></td>
              <td align="center" nowrap  bgcolor="#F4FBFF"><%#Eval("title")%></td>
              <td align="center" nowrap  bgcolor="#F4FBFF"><%#Eval("addtime")%></td>
              <td align="center" nowrap  bgcolor="#F4FBFF" onmouseover="ShowTip('<%#Eval("id") %>',true);" onmouseout="ShowTip('<%#Eval("id") %>',false);">
                <div id='dtip<%#Eval("id") %>' style="width:80px; height:25px;">
                    <%#Eval("tip").ToString()%>
                </div>
                <div id='itip<%#Eval("id") %>' style="width:80px; height:25px; display:none;">
                    <input id='tip<%#Eval("id") %>' type='text' class="input" value='<%#Eval("tip").ToString()%>' style="width:35px" />&nbsp;<input name='btnTip' type='button' class='bt' value='修改' onclick="UpdateTip('<%#Eval("id") %>');" />
                </div>
              </td>
              <td align="center" nowrap bgcolor="#F4FBFF"><a href='Reply.aspx?id=<%#Eval("id") %>&currpostfix=<%=currpostfix%>'>回复</a> | <a href='?t=delete&id=<%#Eval("id") %>&currpostfix=<%=currpostfix%>' onClick="return window.confirm('确定删除 [<%#Eval("title") %>] 吗?');">删除</a></td>
            </tr>
          </ItemTemplate>
        </asp:Repeater>
        
        <tr>
          <td height="25" colspan="9" bgcolor="#F4FBFF">
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td>
                        <input name="chkAll" type="checkbox" id="chkAll" onClick="CheckAll(form)" value="checkbox" style="position:absolute;clip: rect(6 15 15 6)">
                        <img for="chkAll" src="../images/cms-ico12.gif" border="0">
                        <asp:ImageButton ID="ImageButton_all_del" runat="server" ImageUrl="../images/cms-ico10.gif" onclick="ImageButton_all_del_Click" style="width: 63px" />  
                        <asp:ImageButton ID="ImageButton_all_unlock" runat="server" 
                            ImageUrl="../images/cms-ico11.gif" style="width: 63px" 
                            onclick="ImageButton_all_unlock_Click" />     
                    </td>
                    <td>
                        <asp:Literal ID="litPager" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
          </td>
          </tr>
      </table>
 
        </td>
      </tr>
     </table>
    </form>
    
    
    </td>
  </tr>
 </table>
</div>
</body>
</html>